﻿<%@ Page Language="C#" EnableEventValidation ="true"  MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="s.aspx.cs"
    Inherits="map.s" Title="店铺" %>
<%@ Register Assembly="RuleCode.Common" Namespace="RuleCode.Controls" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <center>
    <div id="MainDiv" class="MainDiv">    
        <div  class="headerdiv">
            &nbsp;&nbsp;&nbsp;
            <asp:HyperLink ID="HyperLink_login" runat="server" >登录</asp:HyperLink>
            <img src="/img/shuxian.gif" />&nbsp;
            <asp:HyperLink ID="HyperLink_logout" runat="server" NavigateUrl="/member/loginout.aspx" >注销</asp:HyperLink>
            <img src="/img/shuxian.gif" />&nbsp;
            <a title="藏宝网" id="content_member" rel="DIV_member" href="index.aspx" target="_blank">会员中心</a> 
        </div>
         
        <div style=" width:100%;">
            <div class="poistion-content">
                 <a target="_blank" style="color:Blue;" href="default.aspx">藏宝网首页</a> > <a id="currentShopAnchor" runat="server"></a>
            </div>
        </div>
        
        <div>
            <table class="bannertable"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td  >
                        <div  class="banner s_banner" style="  padding-left:0px;" id="BannerDiv" runat="server"> 
                            <div style=" padding-left:30px;padding-top:30px;">
                                <table>
                                    <tr>
                                        <td>
                                            <img id="LogoImage"  title ="点击查看店标大图"  runat="server" style="width: 70px; height: 70px;" class="magnify " />
                                        </td>
                                        <td style="vertical-align :top; ">
                                            <a id="ShopTitleAnchor" runat="server" target="_blank"  class="shoptitle"></a>
                                        </td>
                                    </tr>
                                </table>
                            </div>                             
                        </div>
                    </td>
                    <td  >
                        <div class="divbox "   >
                            <div class="divtitle">
                                <b>店铺公告</b>
                            </div>
                            <div class="divcontent ">
                                <div  class="board-content">
                                    <asp:Literal ID="IntroLiteral" runat="server" Text=""></asp:Literal>  &nbsp;
                                </div>                            
                            </div>
                            <div class="divbottom  " > &nbsp;
                            </div>
                        </div>                         
                    </td>
                </tr>
             </table>
        </div>  
            
        <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 200px; vertical-align:top ; overflow:hidden">                   
                    <div class="divbox"  >
                        <div class="divtitle">
                            <b  >基本信息</b>
                        </div>
                        <div class="divcontent">
                            <table width="100%"   class="shopInfoTable" >                                   
                                <tr>
                                    <td class="td_01">
                                        昵称：
                                    </td>
                                     <td style="  text-align:left; vertical-align:top;">
                                        <asp:Label ID="Label_nick" CssClass="InfoLable" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                        地区：
                                    </td>
                                     <td style="  text-align:left; vertical-align:top;">
                                        <asp:Label ID="Label_area" CssClass="InfoLable" runat="server" Text="位置"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                        好评：
                                    </td>
                                     <td style="  text-align:left; vertical-align:top;">
                                        <asp:Label ID="Label_good" CssClass="InfoLable" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                        差评：
                                    </td>
                                     <td style="  text-align:left; vertical-align:top;">
                                        <asp:Label ID="Label_bad" CssClass="InfoLable" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                        客服1：
                                    </td>
                                     <td style="  text-align:left; vertical-align:top;">
                                        <asp:Literal ID="Literal_chat" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                        客服2：
                                    </td>
                                     <td style="  text-align:left; vertical-align:top;">
                                        <asp:Literal ID="Literal_jjr" runat="server"></asp:Literal>
                                    </td>
                                </tr>      
                            </table>                        
                        </div>
                        <div class="divbottom">  &nbsp;
                        </div>
                    </div> 
                     <div class="divbox" >
                        <div class="divtitle"> 
                            <b>搜索</b>
                        </div>
                        <div class="divcontent" style=" vertical-align:top ;">
                            <table width="100%" style=" padding:5px 0px 5px 0px;">
                                <tr>
                                    <td class="td_01">
                                        关键字：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TextBox_key" runat="server"  Width="125px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                        价格：
                                    </td>
                                    <td>
                                          <asp:TextBox ID="TextBox_PriceFrom" runat="server" Text="0.00"  Width="50px"></asp:TextBox>
                                        到<asp:TextBox ID="TextBox_PriceTo" runat="server"  Text=""  Width="50px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_01">
                                         
                                    </td>
                                    <td>
                                        <asp:Button ID="Button_search" runat="server"   ToolTip="回车键直接搜索" 
                                            CssClass ="searchButton" Text =" " OnClientClick =" return validateSearch();"    OnClick="Button_search_Click"  />
                                    </td>
                                </tr>
                            </table>                            
                        </div>
                        <div class="divbottom"> &nbsp;
                        </div>
                    </div>  
                    <div class="divbox"  >
                        <div class="divtitle">
                            <b>商品分类</b>
                        </div>
                        <div id="ajaxtree" class="divcontent" style=" padding-top:5px;">          
                            <asp:TreeView ID="TreeView1" runat="server" ShowLines="true" ShowExpandCollapse="true"
                                CssClass="ajaxtree" onselectednodechanged="TreeView1_SelectedNodeChanged" >
                                <SelectedNodeStyle  BackColor="lightGray"/>
                            </asp:TreeView>
                        </div>
                        <div class="divbottom">  &nbsp;
                        </div>
                    </div>  
                    <div class="divbox" style=" background-position:0px 0px;">
                        <div class="divtitle">
                             <b>位置</b>
                        </div>
                        <div  class="divcontent" style=" padding:0px 0px 0px 0px;">
                            <div style=" width:200px; overflow:hidden;">
                                <asp:Literal ID="PositionLiteral"  runat="server" Text="位置"></asp:Literal>
                            </div>
                        </div>
                        <div class="divbottom">  &nbsp;
                        </div>
                    </div>
                </td>    
                <td  style="vertical-align:top; width:695px;">
                   
                    
                    <div class="divblock">
                        <div class="divblocktop"> 
                            <b>所有宝贝</b>
                        </div>
                        <div class="divblockcontent">
                            <a id="listDisplayAnchor" href="#list" onclick="dispinlist();">以目录方式显示</a> | 
                            <a class="selectedDisplayMode" id="pictureDisplayAnchor" href="#picture" onclick="dispinpic(); ">以橱窗方式显示</a>
                            <br /><br />
                            <div id="divlist" style="width: 100%; display: none;">    
                                <asp:DataList ID="DataList1" runat="server" Width="100%" DataKeyField="RECID">
                                    <ItemTemplate>
                                        <table id="producttable" width="100%" style="border: solid 1px #F6EDED;margin:2px 2px 2px 2px;">
                                            <tr>
                                                <td style="width: 60px">
                                                    <asp:Image ID="Image2" runat="server" ImageUrl='<%#(Eval("taobaopic_path").ToString().Trim()==string.Empty)?"~/img/userdefaultimg.gif":Eval("taobaopic_path").ToString()%>' Width="60px"
                                                        Height="60px" />
                                                </td>
                                                <td style="vertical-align: top; width: 160px;">
                                                    <div class="desc" style="vertical-align:middle ;"> 
                                                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#"/member/i.aspx?id="+Eval("RECID").ToString() %>'
                                                            Target="_blank"><%#RuleCode.zfunction.CutString(Eval("taobaotitle").ToString(), 120, "..")%></asp:HyperLink>
                                                    </div>
                                                </td>
                                                <td style="width: 60px;">
                                                   <div class="price">         
                                                        <strong><%#Eval("taobaoprice").ToString ()+" 元"%></strong>
                                                    </div>  
                                                </td>
                                                <td style="width: 40px;">
                                                    <%#Eval("taobaocity")%>
                                                    <%#Eval("taobaostate")%>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:DataList>
                                <cc1:webpager id="WebPager1" runat="server" ControlToPaginate="DataList1" PageSize="12"
                                      OnPageIndexChanged="WebPager1_PageIndexChanged" />     
                            </div>
                            <div id="divpicture"  style="width: 100%; text-align:left;  display: block;">     
                                <asp:DataList ID="DataList2" runat="server" CssClass="divpicture_list" Width="100%"  DataKeyField="RECID" RepeatColumns="4">
                                    <ItemTemplate>                     
                                        <table style="   border: solid 1px #F6EDED; margin:2px 2px 2px 2px;">
                                            <tr>
                                                <td>
                                                    <a href='<%#"/member/i.aspx?id="+Eval("RECID").ToString() %>'
                                                        target="_blank" style="text-decoration: none;vertical-align:top;">
                                                        <img src='<%#(Eval("taobaopic_path").ToString().Trim()==string.Empty)?"~/img/userdefaultimg.gif":Eval("taobaopic_path").ToString()%>' style="border: 0;  width: 174px; height: 160px;" />
                                                    </a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td  >
                                                    <div class="desc"> 
                                                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#"/member/i.aspx?id="+Eval("RECID").ToString() %>'
                                                            Target="_blank"><%#RuleCode.zfunction.CutString(Eval("taobaotitle").ToString(), 120, "..")%></asp:HyperLink>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="price">
                                                        <span>一口价 ￥</span>
                                                        <strong><%#Eval("taobaoprice").ToString ()+" 元"%></strong>
                                                    </div>                                                      
                                                </td>
                                            </tr>
                                        </table>  
                                    </ItemTemplate>
                                </asp:DataList>
                                <cc1:WebPager id="WebPager2" runat="server"  ControlToPaginate ="DataList2"  PageSize ="12"
                                      OnPageIndexChanged="WebPager2_PageIndexChanged"/>   
                            </div>
                        </div>
                        <div class="divblockbottom"> &nbsp;
                        </div>
                        
                    </div> <br />
                    
                    <div class="divblock">
                        <div class="divblocktop">
                            <b  >实体照片</b>
                        </div>
                        <div class="divblockcontent">  
                             <div  >
                                <asp:DataList ID="imageList" runat="server"
                                     Width="100%">
                                        <ItemTemplate>
                                        <table >
                                            <tr>
                                                <td>
                                                    <img id="Img0" title ="点击查看大图" class="magnify entryImage" src='<%# Eval("cbpathlogo") %>'>
                                                    </img> 
                                                </td>
                                                <td> 
                                                    <img id="Image1" title ="点击查看大图"  class="magnify entryImage" src='<%# (Eval("cbpath2").ToString()=="") ? (Eval("cbpathlogo").ToString()):(Eval("cbpath2").ToString())%>'>
                                                    </img> 
                                                </td>
                                                <td>
                                                    <img id="Img1" title ="点击查看大图"  class="magnify entryImage" src='<%# (Eval("cbpath3").ToString()=="") ? (Eval("cbpathlogo").ToString()):(Eval("cbpath3").ToString())%>'>
                                                    </img> 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <img id="Img2" title ="点击查看大图"  class="magnify entryImage" src='<%# (Eval("cbpath4").ToString()=="") ? (Eval("cbpathlogo").ToString()):(Eval("cbpath4").ToString())%>'>
                                                    </img>  
                                                </td>
                                                <td>
                                                    <img id="Img3" title ="点击查看大图"  class="magnify entryImage" src='<%# (Eval("cbpath5").ToString()=="") ? (Eval("cbpathlogo").ToString()):(Eval("cbpath5").ToString())%>'>
                                                    </img>  
                                                </td>
                                                <td>
                                                    <img id="Img4" title ="点击查看大图"  class="magnify entryImage"  src='<%# (Eval("cbpath6").ToString()=="") ? (Eval("cbpathlogo").ToString()):(Eval("cbpath6").ToString())%>'>
                                                    </img>  
                                                </td>
                                            </tr>
                                        </table>                                        
                                              
                                        </ItemTemplate>
                                    </asp:DataList>
                             </div>  
                        </div>
                        <div class="divblockbottom"> &nbsp;
                        </div>
                                             
                     </div>
                </td>
            </tr>
        </table> 
        <br />   
        <hr />
        <div style=" text-align:left ; padding-left:120px; height:100px; padding-top:10px; vertical-align:middle ;">      
            藏宝网 版权所有 CangBaoWang.Net 
        </div>
       
    </div>
    <div id="DIV_member" style="position: absolute; visibility: hidden; border: 1px solid Gray;
        background-color: White; width: 65px; padding: 4px; z-index: 100;">
        <a href="/member/pinfo.aspx">个人信息</a><br />
        <a href="/member/pfriends.aspx">我的好友</a><br />
        <a href="/member/pshop.aspx">我的店铺</a><br />
        <a href="/member/pbbs.aspx">我的论坛</a><br />           
    </div>
    </center>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/js/jquery.magnifier.js"></script> 
    <script type="text/javascript" src="/js/cookie_js.js"></script>  
    <script type="text/javascript" src="/js/dropdowncontent.js"></script>   
    <script type="text/javascript">
        dropdowncontent.init("content_member", "left-bottom", 300, "mouseover")  
        
        function dispinlist() {              
            document.getElementById("divpicture").style.display = "none";
            document.getElementById("divlist").style.display = "block";
            document.getElementById("pictureDisplayAnchor").className = ""; 
            document.getElementById("listDisplayAnchor").className = "selectedDisplayMode";
            setCookie("list", "f980", "displaymode");
        }

        function dispinpic() {
            document.getElementById("divpicture").style.display = "block";
            document.getElementById("divlist").style.display = "none";
            document.getElementById("pictureDisplayAnchor").className = "selectedDisplayMode";
            document.getElementById("listDisplayAnchor").className = "";
            setCookie("pic", "f980", "displaymode");
        }

        function validateSearch() {
            var priceFrom = document.getElementById("ctl00_ContentPlaceHolder1_TextBox_PriceFrom").value;
            var priceTo = document.getElementById("ctl00_ContentPlaceHolder1_TextBox_PriceTo").value;
            if (isDouble(priceFrom) && isDouble(priceTo)) {
                return true;            
            }
            else {
                alert("输入的价格格式不正确，最多保留两位小数！");
                return false;
            }
        }

        function initialize(zlong, zlat) {
            if (GBrowserIsCompatible()) {
                var map = new GMap2(document.getElementById("map_canvas"));
                map.setCenter(new GLatLng(zlat, zlong), 14);
                var point = new GLatLng(zlat, zlong);
                map.addOverlay(new GMarker(point));
            }
        }
        function addEventHandler(oTarget, sEventType, fnHandler) {
            if (oTarget.addEventListener) {
                oTarget.addEventListener(sEventType, fnHandler, false);
            } else if (oTarget.attachEvent) {
                oTarget.attachEvent("on" + sEventType, fnHandler);
            } else {
                oTarget["on" + sEventType] = fnHandler;
            }
        }
        //删除事件链
        function removeEventHandler(oTarget, sEventType, fnHandler) {
            if (oTarget.removeEventListener) {
                oTarget.removeEventListener(sEventType, fnHandler, false);
            } else if (oTarget.detachEvent) {
                oTarget.detachEvent("on" + sEventType, fnHandler);
            } else {
                oTarget["on" + sEventType] = null;
            }
        }

        function isDouble(value) {
            var reg = /^[1-9]d*$|^([1-9]d*.d*|0.d*[1-9]d*|0?.0+|0)$|^( )*$/;
            var result = (reg.test(value));
            
            return result;
        }
        
        function initFrameHeight() {
            if (window.parent != null) {
                //document.getElementById("MainDiv").style.width = screen.availWidth - 220 + "px";
                var frameObj = window.parent.document.getElementById("CateOprFrame");
                if (frameObj != null) {
                    frameObj.style.height = document.getElementById("MainDiv").offsetHeight + 100 + "px";
                    //frameObj.style.width = document.getElementById("MainDiv").offsetWidth  +100 + "px";
                }
            }
        }
                        
        addEventHandler(document.body, "keydown", function(o) {
            o = o || window.event;  
            if (o.keyCode == "13") {
                document.getElementById("ctl00_ContentPlaceHolder1_Button_search").click();
            }
        });
        addEventHandler(document.getElementById("ctl00_ContentPlaceHolder1_TextBox_key"), "keydown", function(o) {
            o = o || window.event;
            if (o.keyCode == "13") {
                document.getElementById("ctl00_ContentPlaceHolder1_Button_search").click();
            }
        });
        
        addEventHandler(window, "load", initFrameHeight); 
        
       
    </script>
</asp:Content>
